package lvhui.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import lvhui.dao.LvOrder_MasterDao;
import lvhui.entity.LvOrder_Master;
import util.C3P0Util;

/**
* @author 吕辉
*
* @date 2019年8月22日
*/
public class LvOrder_MasterDaoImpl implements LvOrder_MasterDao {

	@Override
	public List<LvOrder_Master> getAllLvOrder_Master() {
		List<LvOrder_Master> list = null;
		QueryRunner qr = new QueryRunner(C3P0Util.getDataSource());
		String sql = "SELECT * FROM order_master";
		try {
			list = qr.query(sql, new BeanListHandler<LvOrder_Master>(LvOrder_Master.class));
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;
	}

}

